/*
 * Structures.cpp
 *
 *  Created on: Feb 2, 2013
 *      Author: w1084063
 */

#include <iostream>
using namespace std;

struct X{ int x; double y; };
class  Xc{ int x; double y; };
class  Y{
public:
	int getx(){ return x;};
	double gety();
	void setx(int x_in);
	void sety(double y_in){ y = y_in; };
private:
	int x; double y;
};
double Y::gety(){
	return y;
}
void Y::setx(int x_in){
	x = x_in;
}

int main(void){
	cout << "Structures " << endl;

	X x = { 10, 3.1415};
	Y y;
	y.setx( 5 ); y.sety( 2.543);

	cout << " x has [ " << x.x << ", " << x.y <<" ]"<< endl;
	cout << " y has [ " << y.getx() << ", " << y.gety() <<" ]"<< endl;
}



